package com.sisgh.jefdv1.util;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

/**
 * 集合工具类
 */
public class CollectionUtils {
    /**
     * 判断集合是否为空
     * @param c
     * @return
     */
    public static boolean isEmpty(final Collection<?> c) {
        return c == null || c.isEmpty();
    }

    public static <T> List<T> normalize(final List<T> list){
        List<T> res = new ArrayList<>();
        for(T t : list){
            if (t != null){
                res.add(t);
            }
        }
        return res;
    }

}
